package shuzu;

public class ShuZu_DuoShu {
    public static void main(String[] args) {
        int[] arr = {2,2,1,1,1,2,2};
        for (int i = 0;i < arr.length;i++) {
            int cout = 1;
            for (int n = 0;n < arr.length;n++) {
                if (i != n && arr[i] == arr[n]) {
                    cout += 1;
                    if (cout > arr.length / 2) {
                        System.out.println(arr[i]);
                        return;
                    }
                }
            }
        }
    }
}
